﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Skipper_Connector
{
    public partial class ActivationWindow : Form
    {
        public ActivationWindow(string machineCode)
        {
            InitializeComponent();
            this.tbSN.Text = machineCode;
        }

        private string code;
        public string Code
        {
            get { return code; }
            private set
            {
                code = value;
            }
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            this.code = tbActivateCode.Text;

            this.DialogResult = DialogResult.OK;
        }

        private void tbActivateCode_TextChanged(object sender, EventArgs e)
        {
            if (tbActivateCode.Text.Trim().Length > 0)
            {
                btnOK.Enabled = true;
            }
            else
            {
                btnOK.Enabled = false;
            }
        }
    }
}
